package br.jus.tjpe.dominio;

import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class Processo extends EntidadeBase {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String npu;
	private Date data;
	private Vara vara;
	private List<ProcessoParte> partes;

	public Processo() {
		// TODO Auto-generated constructor stub
	}

	public String getNpu() {
		return npu;
	}

	public void setNpu(String npu) {
		this.npu = npu;
	}

	@ManyToOne
	public Vara getVara() {
		return vara;
	}

	public void setVara(Vara vara) {
		this.vara = vara;
	}

	@Temporal(TemporalType.TIMESTAMP)
	public Date getData() {
		return data;
	}

	public void setData(Date data) {
		this.data = data;
	}

	@OneToMany(cascade=CascadeType.ALL)
	public List<ProcessoParte> getPartes() {
		return partes;
	}

	public void setPartes(List<ProcessoParte> partes) {
		this.partes = partes;
	}

}
